import request from '@/utils/request'

// 库存列表
export function fetchStockList(params) {
  return request({
    url: '/operation/opStock/queryList',
    method: 'get',
    params: {
      'endDate': params.endDate,
      'equipmentName': params.equipmentName,
      'pageIndex': params.pageIndex,
      'pageSize': params.pageSize
    },
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqGet'

  })
}
// 库存详情
export function stockDetail(id) {
  return request({
    url: '/operation/opStock/detail',
    method: 'get',
    params: {
      'id': id
    },
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqGet'

  })
}


// 广告屏参数设置
export function setScreen(data) {
  return request({
    url: '/operation/opStock/srceenSetting',
    method: 'post',
    data,
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqPost'

  })
}

//FTP参数配置配置
export function fetchFtpList(params) {
  return request({
    url: '/operation/opStockFtp/queryList',
    method: 'get',
    params: {
      'name': params.name,
      'pageIndex': params.pageIndex,
      'pageSize': params.pageSize
    },
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqGet'

  })
}

//广告屏模块配置列表
export function fetchMoudleList(params) {
  return request({
    url: '/operation/opStockMoudle/queryList',
    method: 'get',
    params: {
      'moudleKey': params.moudleKey,
      'pageIndex': params.pageIndex,
      'pageSize': params.pageSize
    },
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqGet'
  })
}

//添加广告屏模块配置
export function addAdvMoudle(data) {
  return request({
    url: '/operation/opStockMoudle/add',
    method: 'post',
    data,
    port: { ENV_PORT: 8004 },
    ajaxType2: 'reqPost'
  })
}

